{
  "cells": [
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "## What are Notebooks?\n",
        "Notebooks are an interactive tool for mixing code (C#, F#, Python, ...), their output/visualization, and documentation (Markdown) all in one spot.\n",
        "\n",
        "## What are they used for?\n",
        "Notebooks are popular in Statistics, DataScience, and Machine Learning applications. Each of those fields use notebooks as a tool for trying things out, making changes, and seeing how it effects the output. The experimental and exploratory nature of Data Science and Machine Learning make Notebooks a great home but it's certainly not the only use for Notebooks!\n",
        "\n",
        "## How do I get started?\n",
        "Hit play below ![Play Button](https://github.com/JakeRadMSFT/csharp-notebooks/raw/main/notebook-getting-started/images/play.png) to run a single cell or \"Run All\" ![Run All Button](https://github.com/JakeRadMSFT/csharp-notebooks/raw/main/notebook-getting-started/images/run%20all.png) above to run them all."
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 1,
      "metadata": {
        "dotnet_interactive": {
          "language": "csharp"
        }
      },
      "source": [
        "Console.WriteLine(\"Hello Notebooks!\");"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": "Hello Notebooks!\r\n"
          },
          "execution_count": 1,
          "metadata": {}
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "To add more cells you can use the buttons that show up when you hover above or below a cell ![Play Button](https://github.com/JakeRadMSFT/csharp-notebooks/raw/main/notebook-reference/images/hover%20buttons.png).\n",
        "\n",
        "Keyboard shortcuts are also available: [Keyboard Shortcut Reference](https://raw.githubusercontent.com/JakeRadMSFT/csharp-notebooks/main/notebook-getting-started/REF-VS%20Keyboard%20Shortcuts.ipynb)"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "## Code Cells\n",
        "\n",
        "Code cells have all the great features of C#. Below there is a simple example of two cells that shows how variables are accessible across cells and the state remains.\n",
        "\n",
        "Try hitting play on the 2nd cell multiple times!"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 1,
      "metadata": {
        "dotnet_interactive": {
          "language": "csharp"
        }
      },
      "source": [
        "var x = 5;\n",
        "x"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/html": "<div class=\"dni-plaintext\">5</div>"
          },
          "execution_count": 1,
          "metadata": {}
        }
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 1,
      "metadata": {
        "dotnet_interactive": {
          "language": "csharp"
        }
      },
      "source": [
        "x = x + 10;\n",
        "x"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/html": "<div class=\"dni-plaintext\">45</div>"
          },
          "execution_count": 1,
          "metadata": {}
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "To take a deeper dive on Code Cells check out this notebook - [Code Cells](https://github.com/JakeRadMSFT/csharp-notebooks/blob/main/notebook-getting-started/02-Code%20Cells.ipynb)"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "## Markdown Cells\n",
        "\n",
        "Markdown cells are all the cells with formatted information in this document. Each cell has two modes -  Edit Mode and View Mode.\n",
        "\n",
        "To get into Edit Mode click the pencil button  ![Edit Button](https://github.com/JakeRadMSFT/csharp-notebooks/raw/main/notebook-getting-started/images/edit%20markdown.png) that shows up when the Markdown cell has focus.\n",
        "\n",
        "To get into the View Mode click the check mark button  ![Submit Button](https://github.com/JakeRadMSFT/csharp-notebooks/raw/main/notebook-getting-started/images/save%20markdown.png) to view your changes."
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "To take a deeper dive Markdown Cells checkout this notebook - [Markdown Cells](https://github.com/JakeRadMSFT/csharp-notebooks/blob/main/notebook-getting-started/03-Markdown%20Cells.ipynb)"
      ]
    }
  ],
  "metadata": {
    "kernelspec": {
      "display_name": ".NET (C#)",
      "language": "C#",
      "name": ".net-csharp"
    },
    "language_info": {
      "file_extension": ".cs",
      "mimetype": "text/x-csharp",
      "name": "C#",
      "pygments_lexer": "csharp",
      "version": "8.0"
    }
  },
  "nbformat": 4,
  "nbformat_minor": 4
}